How to create nested dictionary using two dictionaries in which value of first dictionary is equal t